package com.man.daoService;


import java.util.List;

import com.man.dao.DateDao;
import com.man.dao.FileDao;
import com.man.dao.FriendsDao;
import com.man.dao.UserDao;
import com.man.entity.Date;
import com.man.entity.File;
import com.man.entity.Friends;
import com.man.entity.User;

public class DaoService {
	
   private 	UserDao userDao=new UserDao();
   private 	FriendsDao friendsDao=new FriendsDao();
   private DateDao dateDao=new DateDao();
   private FileDao fileDao=new FileDao();
   //USER
   public boolean userInsert(User user)
   {
	 boolean b=  userDao.insert(user);
	 return b;
   }
   public boolean userSign(User user) 
   {
	 boolean b=  userDao.userSign(user);
	 return b;
   }
   public User oneUserInformation(User user)
   {
	   User  user2=  userDao.oneSelect(user);
	return user2;	   
   }
   public Boolean oneUserUpdata(User user)
   {
	   boolean b=  userDao.oneUpdata(user);
	   return b;
   }
   public Boolean passwordUserUpdata(User user)
   {
	   boolean b=  userDao.passwordUpdata(user);
	   return b;
   }
   
   //Friends
   public Boolean friendsInsert(Friends friends)
   {
	   Boolean b=friendsDao.insert(friends);
	   return b;
   }
   public List<Friends> friendsSelect(Friends friends)
   {
	   List<Friends> list= friendsDao.Select(friends);
	   return list;
   }
   public Friends friendsOneSelect(Friends friends)
   {
	   Friends friends2=friendsDao.oneSelect(friends);
	   return friends2;
   }
   public Boolean friendsdelect(Friends friends)
   {
	   Boolean b=friendsDao.delect(friends);
	   return b;
   }
   public Boolean friendsupdata(Friends friends)
   {
	   Boolean b=friendsDao.updata(friends);
	   return b;
   }
   
   //Date
   public Boolean dateInsert(Date date)
   {
	   Boolean b=dateDao.insert(date);
	   return b;
   }
   public List<Date> dateSelect(Date date)
   {
	   List<Date> list= dateDao.Select(date);
	   return list;
   }
   public Date dateOneSelect(Date date)
   {
	   Date date2= dateDao.oneSelect(date);
	   return date2;
   }
   public Boolean dateDelect(Date date)
   {
	   Boolean b=dateDao.delect(date);
	   return b;
   }
   public Boolean dateUpdata(Date date)
   {
	   Boolean b=dateDao.updata(date);
	   return b;
   }
   
   //file
   public Boolean fileInsert(File file)
   {
	   Boolean b=fileDao.insert(file);
	   return b;
   }
   public List<File> fileSelect(File file)
   {
	   List<File> list= fileDao.Select(file);
	   return list;
   }
   public File fileOneSelect(File file)
   {
	  File date2= fileDao.oneSelect(file);
	   return date2;
   }
   public boolean filedelete(File file)
   {  
	   return fileDao.delete(file);
   }
}
